//
//  PhotoCollectionViewCell.m
//  SoundPill
//
//  Created by 宋旭东®Des on 15/1/20.
//  Copyright (c) 2015年 宋旭东. All rights reserved.
//

#import "PhotoCollectionViewCell.h"

@interface PhotoCollectionViewCell ()

@end

@implementation PhotoCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.selectedState = NO;
        [self createSubviews];
    }
    return self;
}

- (void)createSubviews
{
    self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)];
    [self addSubview:_imageView];
    
    self.touchCountLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)];
    _touchCountLabel.hidden = YES;
    [_touchCountLabel setBackgroundColor:[UIColor colorWithWhite:0.000 alpha:0.500]];
    [_touchCountLabel setTextColor:[UIColor whiteColor]];
    [_touchCountLabel setTextAlignment:NSTextAlignmentCenter];
    [self addSubview:_touchCountLabel];
    
    self.delButton = [UIButton buttonWithType:UIButtonTypeCustom];
    _delButton.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.width);

    [self.delButton setTitle:@"删除" forState: UIControlStateNormal];
    _delButton.hidden = YES;
    _delButton.backgroundColor = [UIColor colorWithWhite:0.000 alpha:0.700];
    _delButton.userInteractionEnabled = NO;
    [self addSubview:_delButton];
}



@end
